//
//  TMCourseItemCell.m
//  国学商家管理
//
//  Created by Tao Li on 2018/6/26.
//  Copyright © 2018年 mac. All rights reserved.
//

#import "TMCourseItemCell.h"
#import "TMShopCourseModel.h"

@implementation TMCourseItemCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    self.courseImage.contentMode = UIViewContentModeScaleAspectFit;
    self.courseImage.clipsToBounds = YES;
}
- (void)setCourseModel:(TMShopCourseModel *)courseModel{
    _courseModel = courseModel;
    [self.courseImage sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithBaseUrl:_courseModel.pic[0]]] placeholderImage:kPlaceholder];
    //self.courseImage.contentMode = UIViewContentModeScaleAspectFill;
    self.courseLabel.text = _courseModel.name;
}
- (void)setTeacherModel:(TMShopTeacherModel *)teacherModel{
    _teacherModel = teacherModel;
    [self.courseImage sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithBaseUrl:_teacherModel.image]] placeholderImage:kPlaceholder];
    //self.courseImage.contentMode = UIViewContentModeScaleAspectFit;
    self.courseLabel.text = _teacherModel.name;
}
@end
